#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName :cp2_2.10.py
# @Time     :2023/6/20 23:41
# @Author   :Ash
from collections import namedtuple, OrderedDict

if __name__ == "__main__":
    City = namedtuple('City', 'name country population coordinates')
    print(City._fields)
    LatLong = namedtuple('LatLong', 'lat long')
    delhi_data = ('Delhi NCR', 'IN', 21.935, LatLong(28.613889, 77.208889))
    delhi = City._make(delhi_data)
    delhi._asdict()
    for key, value in delhi._asdict().items():
        print(key + ':', value)
